-
-
Notifications
You must be signed in to change notification settings - Fork 736
📝 Add example code for sa_column onupdate timestamps #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
📝 Add example code for sa_column onupdate timestamps #372
Conversation
d53330d
to
893bcf3
Compare
Codecov ReportBase: 98.49% // Head: 97.74% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #372 +/- ##
==========================================
- Coverage 98.49% 97.74% -0.76%
==========================================
Files 185 186 +1
Lines 5856 5901 +45
==========================================
Hits 5768 5768
- Misses 88 133 +45
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
📝 Docs preview for commit 893bcf3 at: https://63131ab0d8aeff704c33fd2d--sqlmodel.netlify.app |
📝 Docs preview for commit 1e5caaa at: https://6326cad9fcbd027752da81e2--sqlmodel.netlify.app |
📝 Docs preview for commit d78fc71 at: https://636244bbeb67cb7064300959--sqlmodel.netlify.app |
Full path to the docs page: https://636244bbeb67cb7064300959--sqlmodel.netlify.app/advanced/sa-column/ |
📝 Docs preview for commit b160fc8 at: https://639ce08a1f184e006c3a2967--sqlmodel.netlify.app |
This is actually very valuable documentation which I was a bit missing. What is it missing to get merged? |
Issue #370 is a common usecase and there have been a few other questions about how to implement
created_at
orupdated_at
timestamps in rows. This PR adds examples to the advanced section of the documentation on how this can be done withsa_column
s, and also links the relevant sections of Pydantic documentation which show how to use factories or validators to achieve a similar thing with Pydantic.